<!DOCTYPE html>
<html>
<head>
    <title>edit</title>
    <script>
        window.conf = {"GPATH":"{:cmf_plugin_url('Goods://goods/getSpecAttrs')}","GUPPATH":"{:cmf_plugin_url('Goods://goods/upspecimg')}","GTUPPATH":"{:cmf_plugin_url('Goods://goods/uploadthumb')}","STATIC":"__PLUGIN_TMPL__/public/image/goodsspecimg"}
        </script>
	<include file='public/head'>
	<style>
		.layui-legend-size{font-size:14px !important;}
		.layui-nopadding{padding:0 !important;}
		.layui-overflow{overflow:auto;}
		.layui-nomargin{margin: 0 !important;}
		.layui-bottom{border-bottom:1px solid rgb(226, 226, 226);}
		.layui-input{height:30px !important; }
		.layui-form-search-item .layui-inline{margin-bottom: 5px;} 
		.layui-form-search-item label{margin-left: 15px;}
		.layui-table-page {padding: 7px 0px 0px;}
		.layui-field-padding{border-width: 1px;padding:0 0 5px 10px;}
	</style>
</head>
<body>
    <div class="layui-tab">
        <!-- 表单开始 -->
        <form class="layui-form" id="f">
            <volist name="data" id="vo">
                <div class="layui-form-item" >
                <label class="layui-form-label" style="width: 150px;">{$vo.title}</label>
                <input type="checkbox" name="{$vo.name}" lay-skin="switch" lay-text="是|否"  value="1" {$vo.is_show == 1 ? 'checked':''}   >
                </div>   
            </volist> 
        </form>
        <!-- 表单结束 -->
    </div>
<include file='public/scripts'>
<script type="text/javascript">
    var tijiao = function(){
        var dara = $("#f").serialize();
		$.ajax({
            url:"{:cmf_plugin_url('Goods://goods_comment/commentConfig')}",
			data:dara,
			type:'post',
			success:function(data){console.log(data);
				if (data.code == 200) {
					layer.msg(data.message,{icon:1,time:1500},function(){
						parent.layer.closeAll();
						parent.location.reload(); 
					});
				} else {
					layer.msg(data.message,{icon:2,time:1500});
				}
			},
			error:function()
			{
				layer.msg('系统错误',{icon:2,time:1500});
			}
        })
    }
</script>
</body>
</html>